<!---
    Title:      EPAR1.1 
    Author:     Bruce Frick
    Purpose:    Step4 BadgeReport
--->

<cfset BASE = CreateObject("component", "cfc.base") / >
<cfset statusQueries = CreateObject("component", "cfc.statusQueries") />
<cfset baseQueries = CreateObject("component", "cfc.queries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
    "/jquery/ui-1.8.5/jquery-ui.min.js,/jquery/plugins/scrollTo/jquery.scrollTo-1.4.2-min.js,js/Step4-BadgeReport.js", <!---JS links--->
    "/jquery/ui-1.8.5/themes/cupertino/jquery-ui.css", <!---CSS links--->
    "Step 4:  HR - Badge Creation Report", <!---Page Title--->
    "Status" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->

    
<cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR)>  
    
    <!---Query objects--->
    <cfset QUERIES = {} />

    <!---Query objects--->        
    
    <h1 class="title">Step 4:  HR - Badge Creation Report</h1>
    <div class="entry">
                    
        <p>
        Welcome, #Session.arrEmpInfo.FirstName# #Session.arrEmpInfo.LastName#.  
        In this step, you'll use this Badge Creation Report to generate 
        the employee badges and provide the resulting badge numbers.</p>  
        <BR /> <BR />
        
        <cfform name="frmStep4" method="post" action="api.cfm?api=step4_badge_creation">
            
            <cfset QUERIES.GetStep4Waiting = statusQueries.funcGetSCFStepWaiting(5) />
            
         <table width = 100%>
             <tr>
                 <td colspan="5">
                     <span class="tableHeader">Badge Creation Report</span>   
                 </td>
                 <td align="right">
                     <a href="PrintBadgeReport.cfm" target="_blank">Print Report</a>
                 </td>
             </tr>
             <tr>
                 <td width = 5%>&nbsp;</td> 
                 <td><u>##</u></td> 
                 <td width=5%>&nbsp;</td> 
                 <td nowrap="nowrap">
                     <strong><u>Name, Job Title, &amp; Department</u></strong>
                 </td>
                 <td width =30%>&nbsp;</td> 
                 <td>
                     <strong><u>New Badge ##</u></strong>
                 </td>
                 <td width =35%>&nbsp;</td>  
             </tr>
             <cfloop from="1" to="#QUERIES.GetStep4Waiting.RecordCount#" index="i"> 
                                                                                    
                <cfset QUERIES.GetEmpInfo = baseQueries.funcGetEmpInfo(QUERIES.GetStep4Waiting.ID[i]) />                    
                <cfset QUERIES.GetPositionInfo = baseQueries.funcGetPositionInfo(QUERIES.GetEmpInfo.PositionID) />
                <cfset QUERIES.GetDepts = baseQueries.funcGetDepts(QUERIES.GetEmpInfo.DeptID) />
                       
				<tr>
				    <td>&nbsp;</td> 
				    <td valign="top">#i#)</td> 
				    <td>&nbsp;</td>  
				    <td nowrap="nowrap">
				        #QUERIES.GetStep4Waiting.Name[i]#<BR />
				        #QUERIES.GetPositionInfo.PositionCodeDescription#<BR />
				        #QUERIES.GetDepts.OrganizationDescription#<BR />
				    </td>
				    <td>&nbsp;</td> 
				    <td align="right">
				        <cfinput type="text" name="Badge_#QUERIES.GetEmpInfo.ID#_#QUERIES.GetStep4Waiting.ID[i]#" 
				           error_message="The badge number for '#QUERIES.GetStep4Waiting.Name[i]#' 
				           is required and must be numeric.  Please provide the number on the back of their badge.  
				           If you are still waiting on a picture and cannot create the badge, 
				           please leave this field blank.">
				    </td>
				</tr>
				<tr>
				    <td>&nbsp;</td> 
				</tr>
				
				</cfloop>
             
             <tr>
                 <td colspan="6" align="right">
                     <cfinput type="hidden" name="FormIndicator" value="0">
                     <cfinput type="button" name="Submit" value="Submit">
                 </td> 
             </tr>
         </table>
         
        </cfform>        
        
    </div>

<cfelse>
    <cfinclude template="denied.cfm">
</cfif>


<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>
